package com.kongwg.exer;
/*
 * 编写一个类实现银行账户的概念，包含的属性有“帐号”、“密码”、
 * “存款余额”、“利率”、“最小余额”，
 * 定义封装这些属性的方法。账号要自动生成。
	编写主类，使用银行账户类，输入、输出3个储户的上述信息。
	考虑：哪些属性可以设计成static属性。

 * 
 * 
 */
public class Account {
	
	private  int account;
	private int password;
	private int balance;
	private static double lilv;
	private static int sbalance;//最小利率
	private static int init=1001;
	
	public Account(){
		this.account= init++;
		this.lilv=0.01;
		this.sbalance=1;
	}
	
	
	public Account(int password, int balance) {
		this();
		this.password = password;
		this.balance = balance;
	}


	public int getPassword() {
		return password;
	}
	public void setPassword(int password) {
		this.password = password;
	}
	public int getBalance() {
		return balance;
	}
	public void setBalance(int balance) {
		this.balance = balance;
	}
	public int getAccount() {
		return account;
	}
	public static double getLilv() {
		return lilv;
	}
	public static int getSbalance() {
		return sbalance;
	}


	@Override
	public String toString() {
		return "Account [account=" + account + ", password=" + password + ", balance=" + balance + "]";
	}
	
	
	
	
}
